package com.example.tests;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import org.testng.annotations.Test;

import com.example.fw.Folders;

public class TestFolderDeletion extends TestBase {
	
	@Test
	public void testFolderDeletion(){
	//	String folder = "newfolder3";
		Folders oldFolders = app.getFolderHelper().getFolders();
		int index = 2;
		app.getFolderHelper().clickOnItem(index );
		app.getFolderHelper().deleteFolder();
		Folders newFolders = app.getFolderHelper().getFolders();
		assertThat(newFolders, equalTo(oldFolders.without(index)));
		// searching for the deleted element in the tree
		
	}

}
